﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XLib.Node;

namespace NodeLib.Sample
{
    public class Data_SelectFolder : NodeBase
    {

        public override void Init()
        {
            SetViewProperty(NodeColorSet.Data, "Variate", "文件夹路径");

            PinGroupList.Add(new TDataPinGroup<string>(this, PinGroupType.Data, "文件夹路径")
            {
                Readable = true,
                Writeable = true
            });

            InitPinGroup();
        }

        public override string GetTypeString() => nameof(Data_SelectFolder);

        public override Dictionary<string, object> GetParaDict()
        {
            Dictionary<string, object> result = new Dictionary<string, object>
            {
                { "Data", GetData(0) },
            };
            return result;
        }

        public override void LoadParaDict(string version, Dictionary<string, object> paraDict)
        {
            SetData(0, paraDict["Data"]);
        }

        protected override NodeBase CloneNode() => new Data_SelectFolder();

    }
}
